package mmoon.mmoonstory.interfaces;

import mmoon.mmoonstory.MMoonAll;
import mmoon.mmoonstory.MMoonStory;
import mmoon.mmoonstory.MMoonUtils;
import net.minecraft.block.Block;

public interface InitBlock {
    String ObjID = "Null";

    default void init(String objID) {
        Block block = this.setID(objID);
        block.setCreativeTab(MMoonUtils.MMOON_CREATIVE_TAB);
        MMoonAll.MMOON_BLOCKS.add(block);
        MMoonAll.MMOON_ITEMS.add(MMoonAll.Block2Item(block));
    }

    default Block setID(String objID) {
        Block block = (Block) this;
        block.setRegistryName(MMoonStory.MOD_ID, objID);
        block.setTranslationKey(MMoonStory.MOD_ID + '.' + objID);
        return block;
    }
}
